
.container {
    width: 100%;
    height: 100vh;
}

.searchBar {
    position: relative;
    height: 30px;
    width: 250px;
    box-shadow: inset 0 -1px 0 0 #eaedea;
    padding: 20px 0 14px 0 ;
    -webkit-user-select: auto;
    -webkit-app-region: drag; 

    & div {
        background: #dbd9d8;
        width:240px;
        border-radius:10px;
        margin-left:10px;
        transform: scale(0.83);
        transform-origin: 0 0;
        }
& input {
    -webkit-app-region: no-drag;
    height: 30px;
    width: 100%;
    line-height: 30px;
    background: none;
    outline: 0;
    border: 0;
    font-family: 'Helvetica';
    font-size: 18px;
    font-weight: 100;
    text-indent: 20px;
    margin-left:18px ;
  }

& i {
    position: absolute;
    left: 16px;
    top: 55%;
    font-size: 24px;
    color: #6b6a6a;
    transform: translateY(-50%);
  }
}


.chats {
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(120vh - 65px);
    scroll-behavior: smooth;
    overflow: scroll;
    background: #e9e7e7;
    transform: scale(0.83);
    width: 300px;
    transform-origin: 0 0;
}

.chat {
    position: relative;
    display: flex;
    height: 48px;
    padding: 8px 15px;
    justify-content: space-between;
    align-items: flex-start;
    cursor: pointer;
    & .fristchat{
        max-width: 180px;
    }
    & img {
        height: 48px;
        width: 48px;
        border-radius: 5px;
    }

    & > div {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    &.sticky {
        background:#e0dede;
    }
    
    &.active,
    &:hover {
        background: #cfcfd2;
    }

}

.info {
    display: flex;
    margin-left: 16px;
    justify-content: space-between;
    flex-direction: column;
}

.username {
    max-width: 140px;
    margin: 0;
    padding: 0;
    padding-right: 4px;
    margin-bottom: 6px;
    font-size: 16px;
    color: #000;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-family: 'SimHei'
}

.message {
    max-width: 170px;
    font-size: 14px;
    color: #686464;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    min-height: 15px;
    max-height: 28px;
}

.times {
    font-size: 12px;
    color: #979797;
}

.dot {
    position: relative;
    transform: scale(0.9);
    &::after {
        position: absolute;
        bottom: 4px;
        right: 0;
        width: 15px;
        height: 15px;
        border-radius: 8px;
        border: 2px solid #fff;
    }

    &.green::after {
        content: '';
        background: #1eb751;
    }

    &.red::after {
        content: attr(data-afterContent);
        background: red;
        text-align: center;
    }
}

@media (width <= 800px) {
    .searchBar{
        & div { 
        width:230px; 
        }
        
        & i { 
            left: 16px;
            top: 55%; 
          }
    }
    .chats {
        top:12px;
    }

    .chat {
        height: 36px;
        padding: 8px 16px;

        & img {
            height: 36px;
            width: 36px;
        }

        &.sticky::before {
            width: 4px;
        }
    }

    .info {
        margin-left: 12px;
    }

    .username {
        max-width: 160px;
        margin-bottom: 4px;
        font-size: 13px;
    }

    .message {
        max-width: 160px;
        font-size: 12px;
    }

    .times {
        font-size: 11px;
    }

    .dot {
        &::after {
            bottom: 3px;
            width: 6px;
            height: 6px;
            border-radius: 6px;
        }
    }
}
